package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("mq")
public class MqttController {

    @Autowired
    private MqttMessageSender mqttMessageSender;

    @GetMapping("send")
    public void send( ){
        mqttMessageSender.send("标题","主要内容");
    }

}
